package org.example.sixdemo;

public class Main {
    public static void main(String[] args) {
        // 创建银行账户对象
        BankAccount myAccount = new BankAccount("123456789", 1000.0);

        // 尝试存钱
//        myAccount.deposit(500.0);
//        System.out.println("Balance after deposit: " + myAccount.getBalance());

//         尝试取钱
        boolean withdrawalSuccessful = myAccount.withdraw(200.0);
        if (withdrawalSuccessful) {
            System.out.println("Withdrawal successful. Balance: " + myAccount.getBalance());
        } else {
            System.out.println("Withdrawal failed. Insufficient funds.");
        }

    }
}
